const name = "tom";
const gender = true;

// function myTagFunc(str) {
//   return str;
// }
// const r = myTagFunc`hey,${name} is a ${gender}.`;
// console.log(r); //['hey','is a','.']

// function myTagFunc(str, name) {
//   console.log(str, name);
// }
// const r = myTagFunc`hey,${name} is a ${gender}.`;
// console.log(r); //['hey','is a','.'] tom

// function myTagFunc(str, name,gender) {
//     return '123'
//   }
//   const r = myTagFunc`hey,${name} is a ${gender}.`;
//   console.log(r); //123

function myTagFunc(str, name, gender) {
  return str[0] + name + str[1] + gender;
}
const r = myTagFunc`hey,${name} is a ${gender}.`;
console.log(r); //hey,tom is a true
